package com.wngbms.multidatasource.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class LeanFactoryBean implements FactoryBean<MyEntity> {

    @Override
    public boolean isSingleton() {
        return true;
    }

    @Override
    public MyEntity getObject() throws Exception {
        return new MyEntity();
    }

    @Override
    public Class<?> getObjectType() {
        return MyEntity.class;
    }
}
